repo.or.cz
/
andmenj-acm.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Solving 10385 - Duathlon (Ternary search)
[andmenj-acm.git]
/
11388 - GCD LCM
/
p11388.cpp
blob
502a689b3bcc0c25a1ba0606ba20f607ded4d62c
1
#include <iostream>
2
3
using namespace
std
;
4
5
int
main
(){
6
int
t
;
7
cin
>>
t
;
8
while
(
t
--){
9
unsigned int
g
,
l
;
10
cin
>>
g
>>
l
;
11
if
(
g
>
l
||
l
%
g
!=
0
)
12
cout
<<
"-1
\n
"
;
13
else
14
cout
<<
g
<<
" "
<<
l
<<
"
\n
"
;
15
}
16
}